<template>
    <div>
     <div class="title-background">
         <div class="block">
           <svg @click="goOut">
             <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#arrow-left.6f6409e"></use>
           </svg>
         </div>
       <H3>{{name}}</H3>
     </div>
    </div>
</template>

<script>
    // import HeaderComponent from './components/header.vue'

    export default{
        //父组件传入的数据
        props: {
          name: ""
        } ,
        //本地数据
        data(){
            return {
                msg: 'hello vue'
            }
        } ,
        //方法
        methods: {
          goOut:function (){
            window.history.go(-1);
          }
        } ,
        //进入页面加载
        mounted () {

        } ,
        //计算属性
        computed: {} ,
        //监控数据变化
        watch: {}

    }
</script>

<style lang="less" scoped>
.title-background{
  width: 100%;
  height: 0.4rem;
  background: #0096ff;
  position: relative;
}
.title-background .block{
  width: 0.4rem;
  height: 0.4rem;
  position: absolute;
  top:0;
  left: 0;
}
svg {
  width: 0.25rem;
  height: 0.25rem;
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -0.125rem;
  margin-top: -0.125rem;
}
  h3{
    width: 100%;
    color: #fff;
    text-align: center;
    line-height: 0.4rem;
    font-size: 0.2rem;
  }
</style>
